package org.example.zoo;

import java.util.List;

public class Master {
    private int id;
    private String name;

    public Master() {
        System.out.println("1111111111");
    }

    public Master(int id, String name) {
        System.out.println("1111111111");
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void feed(Animal animal){
        System.out.println("主人对宠物进行投喂。。。");
        if(animal instanceof Dog){
            Dog d = (Dog)animal;
            d.lookDoor();
        }
        animal.eat();

    }


}
